package router

import (
	"gitee.com/game_diamond/model/room"
	"gitee.com/game_diamond/session"
	"gitee.com/game_diamond/srvws/common"
)

//在AI课其他课程 ，则路由到课程
//对于场景，环节划分
func RouterAiStudentConnect(studentId int) {
	gl := session.GetGlobalStudentSession(studentId)
	roomId := gl.RoomId
	r, _ := room.FindAIRoom(roomId)
	r.Enter(studentId)

	common.ChangeScene(studentId, gl.SceneId, gl.SegId)
}

func RouterAiStudentClose(studentId int) {
	gl := session.GetGlobalStudentSession(studentId)
	roomId := gl.RoomId
	r, _ := room.FindAIRoom(roomId)
	r.Leave(studentId)
}
